package com.trf.springcloud.service;

import com.trf.springcloud.mapper.DeptMapper;
import com.trf.springcloud.pojo.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 小小唐
 * @Date 2022/5/19-星期四-21:16
 */
@Service
public class DeptServiceImpl implements DeptService{

    //service调用mapper层
    @Autowired
    private DeptMapper deptMapper;

    @Override
    public boolean addDept(Dept dept) {
        return deptMapper.addDept(dept);
    }

    @Override
    public Dept queryById(Long id) {
        return deptMapper.queryById(id);
    }

    @Override
    public List<Dept> queryAll() {
        return deptMapper.queryAll();
    }
}
